<?php

use Illuminate\Http\Request;
use Illuminate\Support\Facades\Route;

/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| is assigned the "api" middleware group. Enjoy building your API!
|
*/

// 说明：定义在api.php文件中的路由，默认就有了一个前缀 api
// 访问路由 http://www.fwh.com/api/v1/index
// 做版本控制
Route::group(['namespace'=>'Api'],function(){
    // 版本V1
    Route::group(['prefix'=>'v1','namespace' =>'V1'],function(){
        Route::get('index','IndexController@index');
    });

    // 版本V2
    Route::group(['prefix'=>'v2','namespace' =>'V2'],function(){
        Route::get('index','IndexController@index');
    });
});
